/*
 * @Author: lcy
 * @Date: 2023-07-01 09:19:19
 * @Last Modified by: lcy
 * @Last Modified time: 2023-07-01 09:27:40
 */
const { defineConfig } = require('@vue/cli-service')
const dynamic = process.env.VUE_APP_API_URL
module.exports = defineConfig({
  transpileDependencies: true,
  configureWebpack: {
    performance: {
      hints: 'warning',
      //入口起点的最大体积
      maxEntrypointSize: 60000000,
      //生成文件的最大体积**加粗样式**
      maxAssetSize: 40000000,
      //只给出 js 文件的性能提示
      assetFilter: function (assetFilename) {
        return assetFilename.endsWith('.js')
      }
    }
  },
  devServer: {
    host: 'localhost',
    port: 8080,
    proxy: {
      [dynamic]: {
        target: 'http://localhost:7001',
        changeOrigin: true,
        pathRewrite: {
          [`^${dynamic}`]: ''
        }
      }
    }
  }
})
